(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     15541,        523]
NotebookOptionsPosition[     12697,        419]
NotebookOutlinePosition[     13109,        435]
CellTagsIndexPosition[     13066,        432]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[{
 "New in: ",
 Cell["0.0", "HistoryData",
  CellTags->"New"],
 " | Modified in: ",
 Cell[" ", "HistoryData",
  CellTags->"Modified"],
 " | Obsolete in: ",
 Cell[" ", "HistoryData",
  CellTags->"Obsolete"],
 " | Excised in: ",
 Cell[" ", "HistoryData",
  CellTags->"Excised"]
}], "History",
 CellID->1247902091],

Cell[CellGroupData[{

Cell["Categorization", "CategorizationSection",
 CellID->1122911449],

Cell["Tutorial", "Categorization",
 CellLabel->"Entity Type",
 CellID->686433507],

Cell["MathMR", "Categorization",
 CellLabel->"Paclet Name",
 CellID->605800465],

Cell["MathMR`", "Categorization",
 CellLabel->"Context",
 CellID->468444828],

Cell["MathMR/tutorial/NVHamiltonian", "Categorization",
 CellLabel->"URI"]
}, Closed]],

Cell[CellGroupData[{

Cell["Keywords", "KeywordsSection",
 CellID->1427428552],

Cell["XXXX", "Keywords",
 CellID->1251852827]
}, Closed]],

Cell[CellGroupData[{

Cell["Details", "DetailsSection",
 CellID->307771771],

Cell["XXXX", "Details",
 CellLabel->"Lead",
 CellID->218895918],

Cell["XXXX", "Details",
 CellLabel->"Developers",
 CellID->350963985],

Cell["XXXX", "Details",
 CellLabel->"Authors",
 CellID->795871300],

Cell["XXXX", "Details",
 CellLabel->"Feature Name",
 CellID->199739161],

Cell["XXXX", "Details",
 CellLabel->"QA",
 CellID->40625308],

Cell["XXXX", "Details",
 CellLabel->"DA",
 CellID->357121918],

Cell["XXXX", "Details",
 CellLabel->"Docs",
 CellID->35949532],

Cell["XXXX", "Details",
 CellLabel->"Features Page Notes",
 CellID->929432370],

Cell["XXXX", "Details",
 CellLabel->"Comments",
 CellID->240026365]
}, Closed]],

Cell[CellGroupData[{

Cell["NVHamiltonian", "Title",
 CellID->509267359],

Cell[TextData[{
 "In this tutorial, we introduce several different procedures which create NV \
center Hamiltonians. Since NV center in diamond has eight different \
directions, i.e. ",
 Cell[BoxData[
  RowBox[{"{", 
   RowBox[{
    RowBox[{"[", "111", "]"}], ",", " ", 
    RowBox[{"[", 
     RowBox[{"11", 
      OverscriptBox["1", "-"]}], "]"}], ",", " ", 
    RowBox[{"[", 
     RowBox[{"1", 
      OverscriptBox["1", "-"], "1"}], "]"}], ",", " ", 
    RowBox[{"[", 
     RowBox[{
      OverscriptBox["1", "-"], "11"}], "]"}]}], "}"}]], "InlineFormula",
  FormatType->"StandardForm"],
 " and their opposite directions ",
 Cell[BoxData[
  RowBox[{"{", 
   RowBox[{
    RowBox[{"[", 
     RowBox[{
      OverscriptBox["1", "-"], 
      OverscriptBox["1", "-"], 
      OverscriptBox["1", "-"]}], "]"}], ",", " ", 
    RowBox[{"[", 
     RowBox[{
      OverscriptBox["1", "-"], 
      OverscriptBox["1", "-"], "1"}], "]"}], ",", " ", 
    RowBox[{"[", 
     RowBox[{
      OverscriptBox["1", "-"], "1", 
      OverscriptBox["1", "-"]}], "]"}], ",", " ", 
    RowBox[{"[", 
     RowBox[{"1", 
      OverscriptBox["1", "-"], 
      OverscriptBox["1", "-"]}], "]"}]}], "}"}]], "InlineFormula",
  FormatType->"StandardForm"],
 ", we choose the ",
 Cell[BoxData[
  RowBox[{"[", "111", "]"}]], "InlineFormula",
  FormatType->"StandardForm"],
 " direction as the standard ",
 Cell[BoxData["z"], "InlineFormula",
  FormatType->"StandardForm"],
 " direction, as what we do in other related packages. Then, we call the \
coordinate system associated with anNV center along a given direcion other \
than ",
 Cell[BoxData[
  RowBox[{"[", "111", "]"}]], "InlineFormula",
  FormatType->"StandardForm"],
 " \"primed system\". The primed spin-1operators can be expressed in terms of \
the un-primed operators as"
}], "Text",
 CellChangeTimes->{{3.531416550334472*^9, 3.531417071994846*^9}},
 CellID->1534169418],

Cell[BoxData[GridBox[{
   {
    RowBox[{"{", 
     RowBox[{
      SubsuperscriptBox["S", "x", "'"], ",", " ", 
      SubsuperscriptBox["S", "y", "'"], ",", " ", 
      SubsuperscriptBox["S", "z", "'"]}], "}"}], Cell[
    "SPrimeVec[nvdir_]", "TableText"]},
   {
    RowBox[{"eigenstates", " ", "of", " ", 
     SubsuperscriptBox["S", "z", "'"]}], Cell[
    "PrimeBasis[zdir_]", "TableText"]},
   {
    RowBox[{Cell["i", "InlineFormula"], "-", 
     RowBox[{"th", " ", "eigenstate", " ", "of", " ", 
      SubsuperscriptBox["S", "z", "'"]}]}], Cell[
    "EigenState[nvdir_,i_]", "TableText"]}
  }]], "DefinitionBox",
 CellChangeTimes->{{3.531417084576316*^9, 3.531417125114306*^9}, {
  3.531417156030039*^9, 3.531417227025572*^9}},
 CellID->2096742444],

Cell["Primed basis", "Caption",
 CellChangeTimes->{{3.531417238011435*^9, 3.531417241029043*^9}},
 CellID->1891092685],

Cell["Here is some examples.", "Text",
 CellChangeTimes->{{3.531417262611821*^9, 3.531417283461533*^9}},
 CellID->60716583],

Cell[CellGroupData[{

Cell["Primed spin-1 operators", "MathCaption",
 CellChangeTimes->{{3.53141728743774*^9, 3.531417299069925*^9}},
 CellID->836781195],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"nvdir", "=", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"1", ",", "1", ",", 
      RowBox[{"-", "1"}]}], "}"}], "/", 
    SqrtBox["3"]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"MatrixForm", "/@", 
  RowBox[{"SPrimeVec", "[", "nvdir", "]"}]}]}], "Input",
 CellChangeTimes->{{3.531417303373099*^9, 3.531417334152371*^9}},
 CellLabel->"In[7]:=",
 CellID->2058623809],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   TagBox[
    RowBox[{"(", "\[NoBreak]", GridBox[{
       {
        RowBox[{"0.8164965809277261`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{
         RowBox[{"-", "0.35355339059327373`"}], "+", 
         RowBox[{"0.20412414523193148`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]},
       {
        RowBox[{
         RowBox[{"-", "0.35355339059327373`"}], "-", 
         RowBox[{"0.20412414523193148`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{
         RowBox[{"-", "0.35355339059327373`"}], "+", 
         RowBox[{"0.20412414523193148`", " ", "\[ImaginaryI]"}]}]},
       {
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{
         RowBox[{"-", "0.35355339059327373`"}], "-", 
         RowBox[{"0.20412414523193148`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{
         RowBox[{"-", "0.8164965809277261`"}], "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}
      },
      GridBoxAlignment->{
       "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
        "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
      GridBoxSpacings->{"Columns" -> {
          Offset[0.27999999999999997`], {
           Offset[0.7]}, 
          Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
          Offset[0.2], {
           Offset[0.4]}, 
          Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
    Function[BoxForm`e$, 
     MatrixForm[BoxForm`e$]]], ",", 
   TagBox[
    RowBox[{"(", "\[NoBreak]", GridBox[{
       {
        RowBox[{"0.4714045207910318`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.6123724356957945`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.1178511301977579`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]},
       {
        RowBox[{"0.6123724356957945`", "\[VeryThinSpace]", "-", 
         RowBox[{"0.1178511301977579`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.6123724356957945`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.1178511301977579`", " ", "\[ImaginaryI]"}]}]},
       {
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.6123724356957945`", "\[VeryThinSpace]", "-", 
         RowBox[{"0.1178511301977579`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{
         RowBox[{"-", "0.4714045207910318`"}], "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}
      },
      GridBoxAlignment->{
       "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
        "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
      GridBoxSpacings->{"Columns" -> {
          Offset[0.27999999999999997`], {
           Offset[0.7]}, 
          Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
          Offset[0.2], {
           Offset[0.4]}, 
          Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
    Function[BoxForm`e$, 
     MatrixForm[BoxForm`e$]]], ",", 
   TagBox[
    RowBox[{"(", "\[NoBreak]", GridBox[{
       {
        RowBox[{"0.3333333333333333`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "-", 
         RowBox[{"0.6666666666666666`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]},
       {
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.6666666666666666`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "-", 
         RowBox[{"0.6666666666666666`", " ", "\[ImaginaryI]"}]}]},
       {
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{"0.`", "\[VeryThinSpace]", "+", 
         RowBox[{"0.6666666666666666`", " ", "\[ImaginaryI]"}]}], 
        RowBox[{
         RowBox[{"-", "0.3333333333333333`"}], "+", 
         RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}
      },
      GridBoxAlignment->{
       "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
        "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
      GridBoxSpacings->{"Columns" -> {
          Offset[0.27999999999999997`], {
           Offset[0.7]}, 
          Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
          Offset[0.2], {
           Offset[0.4]}, 
          Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
    Function[BoxForm`e$, 
     MatrixForm[BoxForm`e$]]]}], "}"}]], "Output",
 CellChangeTimes->{3.531417335596539*^9},
 CellLabel->"Out[8]=",
 CellID->1124300199]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Primed spin-1 operators", "MathCaption",
 CellChangeTimes->{{3.53141728743774*^9, 3.531417299069925*^9}},
 CellID->1591682320],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{"v1", ",", "v2", ",", "v3"}], "}"}], "=", 
  RowBox[{"PrimeBasis", "[", "nvdir", "]"}]}]], "Input",
 CellChangeTimes->{{3.531417303373099*^9, 3.531417407215469*^9}},
 CellLabel->"In[10]:=",
 CellID->2018206657],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"0.6666666666666669`", ",", 
     RowBox[{"0.`", "\[VeryThinSpace]", "+", 
      RowBox[{"0.6666666666666665`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"-", "0.33333333333333326`"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0.6666666666666661`", ",", 
     RowBox[{"0.`", "\[VeryThinSpace]", "-", 
      RowBox[{"0.33333333333333276`", " ", "\[ImaginaryI]"}]}], ",", 
     "0.6666666666666675`"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.33333333333333404`"}], ",", 
     RowBox[{"0.`", "\[VeryThinSpace]", "+", 
      RowBox[{"0.6666666666666671`", " ", "\[ImaginaryI]"}]}], ",", 
     "0.6666666666666659`"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.531417335596539*^9, {3.531417383850068*^9, 3.531417407709361*^9}},
 CellLabel->"Out[10]=",
 CellID->1082968764]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["More About", "TutorialMoreAboutSection",
 CellID->23220180],

Cell["XXXX", "TutorialMoreAbout",
 CellID->1567025153]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Tutorials", "RelatedTutorialsSection",
 CellID->415694126],

Cell["XXXX", "RelatedTutorials",
 CellID->806871991]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Wolfram Education Group Courses", "TutorialRelatedLinksSection",
 CellID->415694148],

Cell["XXXX", "TutorialRelatedLinks",
 CellID->415694149]
}, Open  ]]
}, Open  ]]
},
WindowSize->{700, 770},
WindowMargins->{{Automatic, 65}, {Automatic, 85}},
FrontEndVersion->"8.0 for Linux x86 (32-bit) (November 7, 2010)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "TutorialPageStyles.nb", 
  CharacterEncoding -> "UTF-8"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[557, 20, 325, 14, 24, "History",
 CellID->1247902091],
Cell[CellGroupData[{
Cell[907, 38, 68, 1, 28, "CategorizationSection",
 CellID->1122911449],
Cell[978, 41, 81, 2, 70, "Categorization",
 CellID->686433507],
Cell[1062, 45, 79, 2, 70, "Categorization",
 CellID->605800465],
Cell[1144, 49, 76, 2, 70, "Categorization",
 CellID->468444828],
Cell[1223, 53, 74, 1, 70, "Categorization"]
}, Closed]],
Cell[CellGroupData[{
Cell[1334, 59, 56, 1, 18, "KeywordsSection",
 CellID->1427428552],
Cell[1393, 62, 45, 1, 70, "Keywords",
 CellID->1251852827]
}, Closed]],
Cell[CellGroupData[{
Cell[1475, 68, 53, 1, 18, "DetailsSection",
 CellID->307771771],
Cell[1531, 71, 63, 2, 70, "Details",
 CellID->218895918],
Cell[1597, 75, 69, 2, 70, "Details",
 CellID->350963985],
Cell[1669, 79, 66, 2, 70, "Details",
 CellID->795871300],
Cell[1738, 83, 71, 2, 70, "Details",
 CellID->199739161],
Cell[1812, 87, 60, 2, 70, "Details",
 CellID->40625308],
Cell[1875, 91, 61, 2, 70, "Details",
 CellID->357121918],
Cell[1939, 95, 62, 2, 70, "Details",
 CellID->35949532],
Cell[2004, 99, 78, 2, 70, "Details",
 CellID->929432370],
Cell[2085, 103, 67, 2, 70, "Details",
 CellID->240026365]
}, Closed]],
Cell[CellGroupData[{
Cell[2189, 110, 50, 1, 105, "Title",
 CellID->509267359],
Cell[2242, 113, 1895, 57, 127, "Text",
 CellID->1534169418],
Cell[4140, 172, 751, 20, 82, "DefinitionBox",
 CellID->2096742444],
Cell[4894, 194, 118, 2, 27, "Caption",
 CellID->1891092685],
Cell[5015, 198, 123, 2, 23, "Text",
 CellID->60716583],
Cell[CellGroupData[{
Cell[5163, 204, 131, 2, 39, "MathCaption",
 CellID->836781195],
Cell[CellGroupData[{
Cell[5319, 210, 404, 12, 59, "Input",
 CellID->2058623809],
Cell[5726, 224, 5068, 120, 174, "Output",
 CellID->1124300199]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[10843, 350, 132, 2, 39, "MathCaption",
 CellID->1591682320],
Cell[CellGroupData[{
Cell[11000, 356, 261, 7, 26, "Input",
 CellID->2018206657],
Cell[11264, 365, 876, 22, 64, "Output",
 CellID->1082968764]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[12189, 393, 65, 1, 72, "TutorialMoreAboutSection",
 CellID->23220180],
Cell[12257, 396, 54, 1, 21, "TutorialMoreAbout",
 CellID->1567025153]
}, Open  ]],
Cell[CellGroupData[{
Cell[12348, 402, 72, 1, 72, "RelatedTutorialsSection",
 CellID->415694126],
Cell[12423, 405, 52, 1, 21, "RelatedTutorials",
 CellID->806871991]
}, Open  ]],
Cell[CellGroupData[{
Cell[12512, 411, 98, 1, 72, "TutorialRelatedLinksSection",
 CellID->415694148],
Cell[12613, 414, 56, 1, 21, "TutorialRelatedLinks",
 CellID->415694149]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
